<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>变量</title>
</head>
<body>
<h1>JavaScript 变量</h1>
<script type="text/javascript">
    var age;
    var data = 18;
    num = 20;
    var n1 = 10;
    var n2 = 20;
    var n3 = n1;
    n1 = n2;
    n2 = n3;
   //alert(n1);
   //alert(n2);
   //console.log(n1);
   //console.log(n2);
   //console.log(n1,n2);
    document.write(n1);
    document.write(n2);
</script>
</body>
</html>